<template>
  <!--我的违法-->
  <div id="myViolation">

  </div>

</template>

<script>
  import {queryHoursRecord} from '@/request/api'
  export default {
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          name: '水资源',
          address: '乱排污水'
        }, {
          date: '2016-05-04',
          name: '水资源',
          address: '乱排污水'
        }]
      }
    },
    mounted() {
      this.getList1()
    },
    methods: {
      getList1() {
        const loading = this.openLoading();
        var params = {
          "_search": true,
          "bgTm": "",
          "data": {
            "userId": JSON.parse(localStorage.getItem('userInfo')).id
          },
          "endTm": "",
          "pageNumber": 1,
          "pageSize": 20
        }
        queryHoursRecord(params).then(res=> {
          if(res.code == 200) {
            this.list = res.data.records
            if(this.list.length!=0) {

            }else {
              this.$message({
                message: '暂无记录',
                type: 'warning',
                offset: '500'
              });
            }
          }
          loading.close();
        }).catch(() => {
          loading.close();
        })
      },
    }
  }
</script>
<style scoped="">
  #myViolation {
    width: 1200px;
    background:#fff;
    margin-bottom:60px;
  }
</style>
